<template>
  <div class="registerDetail">
    <div class="task_header">
      <div class="top_title">
        <div class="top_title_back" @click="onClickLeft">
          <i class="iconfont icon-back"></i>
        </div>
        <div class="top_title_val">{{ $route.meta.title }}</div>
      </div>
    </div>

    <div class="task_detail">
      <div class="task_detail_header">
        <div class="task_detail_headerbox">
          <div class="title">
            <span class="txt">{{ dataSource.carNo ? dataSource.carNo : '-' }}</span>
            <span class="status_txt" :class="dataSource.billStatus == '保存' ? 'carStatus' : 'noCarStatus'" v-if=" dataSource.billStatus">{{ dataSource.billStatus }}</span>
          </div>
          <div class="name">
            <div class="txt">{{ dataSource.customerName ? dataSource.customerName : '-' }}</div>
            <div class="txt">{{ dataSource.vinCode ? dataSource.vinCode : '-' }}</div>
          </div>
        </div>
      </div>
    </div>

    <van-popup v-model="showTablistVisible" closeable position="bottom" :style="{ height: '160px' }">
      <div class="pop_tab">
        <div class="title">选项卡快速选择</div>
        <div class="pop_tablist">
          <div class="pop_tab_item" :class="tabIndex == index ? 'active' : ''" v-for="(item, index) in tabList" :key="index" @click.stop="handleTab(index)">{{ item.name }}</div>
        </div>
      </div>
    </van-popup>
    <div class="tabBarBox">
      <div class="icon_menubox" @click.stop="showTablistVisible = true">
        <img class="icon_menu" src="@/assets/images/show_menu.png" />
      </div>
      <van-tabs v-model="tabIndex" :swipe-threshold="3">
        <van-tab title="基本信息">
          <div class="detailbox_item mt175">
            <div class="detailbox_item_title">工单信息</div>
            <div class="detail_content">
              <div class="task_itembox">
                <div class="task_itembox_con w100">
                  <div class="task_label">工单编号：</div>
                  <div class="task_value">{{ dataSource.billNum ? dataSource.billNum : '- -' }}</div>
                </div>
                <div class="task_itembox_con">
                  <div class="task_label">所属维修中心：</div>
                  <div class="task_value">{{ dataSource.fixCenterName ? dataSource.fixCenterName : '- -' }}</div>
                </div>
                <div class="task_itembox_con">
                  <div class="task_label">所属服务顾问：</div>
                  <div class="task_value">{{ dataSource.empName ? dataSource.empName : '- -' }}</div>
                </div>
                <div class="task_itembox_con">
                  <div class="task_label">工单类型：</div>
                  <div class="task_value">{{ dataSource.workBillType ? dataSource.workBillType : '- -' }}</div>
                </div>
                <div class="task_itembox_con">
                  <div class="task_label">工单分类：</div>
                  <div class="task_value">{{ dataSource.subType ? dataSource.subType : '- -' }}</div>
                </div>
              </div>
            </div>
          </div>
          <div class="detailbox_item">
            <div class="detailbox_item_title">基本信息</div>
            <div class="carInfo_content">
              <div class="carInfo_item">
                <div class="item_label">车辆公里数：</div>
                <div class="item_val">{{ dataSource.carMile ? dataSource.carMile+"km" : '- -' }}</div>
              </div>
              <div class="carInfo_item">
                <div class="item_label">保险到期日：</div>
                <div class="item_val">{{ dataSource.inusuranceDate ? dataSource.inusuranceDate : '- -' }}</div>
              </div>
              <div class="carInfo_item">
                <div class="item_label">实际进场时间：</div>
                <div class="item_val">{{ dataSource.dateIn ? dataSource.dateIn : '- -' }}</div>
              </div>
              <div class="carInfo_item">
                <div class="item_label">实际完工时间：</div>
                <div class="item_val">{{ dataSource.actualFinishDat ? dataSource.actualFinishDat : '- -' }}</div>
              </div>
              <div class="carInfo_item">
                <div class="item_label">建议维修项目:</div>
                <div class="item_val">{{ dataSource.advRepairItem ? dataSource.advRepairItem : ' - -' }}</div>
              </div>
              <div class="carInfo_item">
                <div class="item_label">建议下次保养里程：</div>
                <div class="item_val">{{ dataSource.advMaintenanceMiles ? dataSource.advMaintenanceMiles+'km' : '- - ' }}</div>
              </div>

              <div class="carInfo_item">
                <div class="item_label">建议下次保养时间：</div>
                <div class="item_val">{{ dataSource.advMaintenanceTime ? dataSource.advMaintenanceTime : '- -' }}</div>
              </div>

              <div class="carInfo_item">
                <div class="item_label">送修人：</div>
                <div class="item_val">{{ dataSource.repairCus ? dataSource.repairCus : '- -' }}</div>
              </div>
              <div class="carInfo_item">
                <div class="item_label">送修人电话：</div>
                <div class="item_val">{{ dataSource.repairCusphone ? dataSource.repairCusphone : '- -' }}</div>
              </div>
              <div class="carInfo_item">
                <div class="item_label">合计金额：</div>
                <div class="item_val">{{ dataSource.totalAmount ? dataSource.totalAmount : '- -' }}</div>
              </div>
              <div class="carInfo_item">
                <div class="item_label">应收款金额：</div>
                <div class="item_val">{{ dataSource.totalAmount ? dataSource.receivableAmount : '- -' }}</div>
              </div>
              <div class="carInfo_item">
                <div class="item_label">已收款金额：</div>
                <div class="item_val">{{ dataSource.noPayments ? dataSource.noPayments : '- -' }}</div>
              </div>
            </div>
          </div>
        </van-tab>
        <van-tab title="人工操作">
          <div class="detailbox_item mt165 detailbg">
            <div class="doList" v-if="dataSource.kdtEntry && dataSource.kdtEntry.length != 0">
              <div class="doList_item" v-for="(item, index) in dataSource.kdtEntry" :key="index">
                <div class="item_time">工时代码：{{ item.repairItemNum }}</div>
                <div class="item_do">人工操作：{{ item.repairItemName }}</div>
                <div class="item_box flex">
                  <div class="item_txt">标准 工时：{{ item.standardTime }}</div>
                  <div class="item_txt">单价：{{ item.price }}</div>
                  <div class="item_txt">金额：{{ item.amount }}</div>
                </div>
              </div>
            </div>
            <div class="no_icon" v-else style="padding-top: 100px">
              <img class="no_icon_img" src="@/assets/images/no_icon.png" />
              <div class="no_icon_txt">暂无内容</div>
            </div>
          </div>
        </van-tab>

        <van-tab title="配件信息">
          <div class="detailbox_item mt165 detailbg">
            <div class="doList" v-if="dataSource.kdtMaterial && dataSource.kdtMaterial.length != 0">
              <div class="doList_item" v-for="(item, index) in dataSource.kdtMaterial" :key="index">
                <div class="item_do">
                  <div class="item_name">配件编号：</div>
                  <div>{{ item.materialNum }}</div>
                </div>
                <div class="item_do">
                  <div class="item_name">配件名称：</div>
                  <div>{{ item.materialName }}</div>
                </div>
                <div class="item_box flex">
                  <div class="item_txt">数量：{{ item.qty }}</div>
                  <div class="item_txt">单价：{{ item.price }}</div>
                  <div class="item_txt">金额：{{ item.amount }}</div>
                </div>
              </div>
            </div>
            <div class="no_icon" v-else style="padding-top: 100px">
              <img class="no_icon_img" src="@/assets/images/no_icon.png" />
              <div class="no_icon_txt">暂无内容</div>
            </div>
          </div>
        </van-tab>
        <van-tab title="卡券抵用信息">
          <div class="detailbox_item mt175 mb60" :class="dataSource.kdtVoucher.length != 0?'detailbg':''">
            <div class="card_content">
              <div class="card_list" v-if=" dataSource.kdtVoucher &&  dataSource.kdtVoucher.length != 0">
                <div class="card_item" v-for="(item, index) in dataSource.kdtVoucher" :key="index">
                  <div class="item_lt">¥{{ item.amount }}</div>
                  <div class="item_rt">
                    <div class="item_name">{{ item.voucherName }}</div>
                    <div class="item_number">券号：{{ item.voucherNum }}</div>
                    <div class="item_time">
                      <div>{{ item.deDate }}已使用</div>
                    </div>
                  </div>
                  <div class="item_type">{{ item.couponsType }}</div>
                </div>
              </div>
              <div class="no_icon" v-else style="padding-top: 100px">
                <img class="no_icon_img" src="@/assets/images/no_icon.png" />
                <div class="no_icon_txt">暂无内容</div>
              </div>
            </div>
          </div>
        </van-tab>
      </van-tabs>
    </div>

    <!--
    <div class="formData">
      <van-field
        readonly
        v-model="dataSource.billNum"
        name="工单编号"
        label="工单编号"
        input-align="right"
      />

      <van-field
        readonly
        v-model="dataSource.fixCenterName"
        name="所属维修中心"
        label="所属维修中心"
        input-align="right"
      />

      <van-field
        v-model="dataSource.empName"
        name="所属服务顾问"
        label="所属服务顾问"
        input-align="right"
        readonly
      />

      <van-field
        v-model="dataSource.workBillType"
        name="工单类型"
        label="工单类型"
        input-align="right"
        readonly
      />

      <van-field
        v-model="dataSource.subType"
        name="工单分类"
        label="工单分类"
        input-align="right"
        readonly
      />

      <van-field
        v-model="dataSource.customerName"
        name="客户名称"
        label="客户名称"
        input-align="right"
        readonly
      />
      <van-field
        v-model="dataSource.carNo"
        name="车牌号码"
        label="车牌号码"
        input-align="right"
        readonly
      />
    </div>
    <div class="tabBarBox">
      <van-tabs v-model="tabActive">
        <van-tab title="基本信息">
          <div class="tabCar">
            <van-field
              v-model="dataSource.vinCode"
              name="车架号"
              label="车架号"
              input-align="right"
              readonly
            ></van-field>
            <van-field
              v-model="dataSource.carMile"
              name="车辆公里数"
              label="车辆公里数"
              input-align="right"
              readonly
            >
              <template slot="button">km</template>
            </van-field>
            <van-field
              v-model="dataSource.dateIn"
              name="实际进场时间"
              label="实际进场时间"
              input-align="right"
              readonly
            />
            <van-field
              v-model="dataSource.dateIn"
              name="实际完工时间"
              label="实际完工时间"
              input-align="right"
              readonly
            />
            <van-field
              v-model="dataSource.advRepairItem"
              name="建议维修项目"
              label="建议维修项目"
              input-align="right"
              readonly
            />
            <van-field
              label-width="150px"
              v-model="dataSource.advMaintenanceMiles"
              name="建议下次保养里程"
              label="建议下次保养里程"
              input-align="right"
              readonly
            >
              <template slot="button">km</template>
            </van-field>
            <van-field
              label-width="150px"
              v-model="dataSource.advMaintenanceTime"
              name="建议下次保养时间"
              label="建议下次保养时间"
              input-align="right"
              readonly
            />
            <van-field
              v-model="dataSource.repairCus"
              name="送修人"
              label="送修人"
              input-align="right"
              readonly
            />
            <van-field
              v-model="dataSource.repairCusphone"
              name="送修人电话"
              label="送修人电话"
              input-align="right"
              readonly
            />
            <van-field
              v-model="dataSource.totalAmount"
              name="合计金额"
              label="合计金额"
              input-align="right"
              readonly
            />
            <van-field
              v-model="dataSource.receivableAmount"
              name="应收款金额"
              label="应收款金额"
              input-align="right"
              readonly
            />
            <van-field
              v-model="dataSource.noPayments"
              name="已收款金额"
              label="已收款金额"
              input-align="right"
              readonly
            />
          </div>
        </van-tab>
        <van-tab title="人工操作">
          <div
            class="doList"
            v-if="dataSource.kdtEntry && dataSource.kdtEntry.length != 0"
          >
            <div
              class="doList_item"
              v-for="(item, index) in dataSource.kdtEntry"
              :key="index"
            >
              <div class="item_time">工时代码：{{ item.repairItemNum }}</div>
              <div class="item_do">人工操作：{{ item.repairItemName }}</div>
              <div class="item_box flex">
                <div class="item_txt">标准工时：{{ item.standardTime }}</div>
                <div class="item_txt">单价：{{ item.price }}</div>
                <div class="item_txt">金额：{{ item.amount }}</div>
              </div>
            </div>
          </div>
          <van-empty class="noContent" description="暂无数据" v-else />
        </van-tab>
        <van-tab title="配件信息">
          <div
            class="doList"
            v-if="dataSource.kdtMaterial && dataSource.kdtMaterial.length != 0"
          >
            <div
              class="doList_item"
              v-for="(item, index) in dataSource.kdtMaterial"
              :key="index"
            >
              <div class="item_do">
                <div class="item_name">配件编号：</div>
                <div>{{ item.materialNum }}</div>
              </div>
              <div class="item_do">
                <div class="item_name">配件名称：</div>
                <div>{{ item.materialName }}</div>
              </div>
              <div class="item_box flex">
                <div class="item_txt">数量：{{ item.qty }}</div>
                <div class="item_txt">单价：{{ item.price }}</div>
                <div class="item_txt">金额：{{ item.amount }}</div>
              </div>
            </div>
          </div>
          <van-empty class="noContent" description="暂无数据" v-else />
        </van-tab>
        <van-tab title="卡券抵用信息">
          <div
            class="cardList"
            v-if="dataSource.kdtVoucher && dataSource.kdtVoucher.length != 0"
          >
            <div
              class="cardItem"
              v-for="(item, index) in dataSource.kdtVoucher"
              :key="index"
            >
              <div class="box flex">
                <div class="cardItem_lt flex">
                  <div class="price_icon">¥</div>
                  <div class="price">
                    <div class="txt">{{ item.amount }}</div>
                    <div class="name">{{ item.couponsType }}</div>
                  </div>
                </div>
                <div class="cardItem_rt">
                  <div class="label_name flex">
                    <div class="label_txt1">
                      {{ item.voucherName }}
                    </div>
                  </div>
                  <div class="label_time">{{ item.deDate }}已使用</div>
                </div>
              </div>
              <div class="cardNo">券号{{ item.voucherNum }}</div>
            </div>
          </div>
          <van-empty class="noContent" description="暂无数据" v-else />
        </van-tab>
      </van-tabs>

    </div>-->
  </div>
</template>

<script>
import { DatetimePicker, Dialog, Empty, Field, Form, Notify, Search, Uploader } from 'vant'
import repairApi from '@/api/repairApi'
import { getCookies } from '../../utils/util'

export default {
  name: 'repairOrderDetail',
  components: {
    Search,
    Empty,
    Field,
    Form,
    Uploader,
    DatetimePicker,
    [Dialog.Component.name]: Dialog.Component
  },
  data() {
    return {
      showTimerPicker: false,
      dataSource: {
        billId: '', //单据ID
        vinCode: '', //车架号
        carNo: '', //车牌号
        fixCenterName: '', //所属维修中心
        empName: '', //所属服务顾问
        workBillType: '', //工单类型
        subType: '', //工单分类
        customerName: '', //客户名称
        mobile1: '', //手机号1
        mobile12: '', //手机号2
        carMile: '', //车辆里程数
        dateIn: '', // 预约进场时间,
        advRepairItem: '', //建议维修项目
        advMaintenanceMiles: '', //建议下次保养里程
        advMaintenanceTime: '', //建议下次保养时间
        repairCus: '', //送修人
        repairCusphone: '', //送修人电话
        totalAmount: '', //合计金额
        receivableAmount: '', //应收款金额
        noPayments: '', //已收款金额
        kdtEntry: [
          // {
          //   entryId: "", //分录id
          //   repairItemNum: "", //工时
          //   repairItemName: "", //人工操作
          //   standardTime: "", //标准工时
          //   paice: "", //单价
          //   amout: "", //金额
          // },
        ],
        kdtMaterial: [
          // {
          //   entryId: "", //分录id
          //   materialNum: "", //配件编码
          //   materialName:"", //配件名称
          //   qty: "", //数量
          //   paice: "", //单价
          //   amout: "", //金额
          // },
        ],
        kdtVoucher: [
          // {
          //   entryId: "", //分录id
          //   voucherNum: "", //抵用卷卷号
          //   voucherId: "", //抵用卷名称
          //   qty: "", //数量
          //   paice: "", //单价
          //   amout: "", //金额
          //   time: "",
          // },
        ]
      },
      uploader: [],
      columns: [],
      showSelectPicker: false,
      detailId: '',
      tabActive: 0,
      userId: getCookies('userId'),
      showTablistVisible: false,
      tabIndex: 0,
      tabList: [
        {
          name: '基本信息',
          value: 1
        },
        {
          name: '人工操作',
          value: 2
        },

        {
          name: '配件信息',
          value: 3
        },
        {
          name: '卡券抵用信息',
          value: 3
        }
      ]
    }
  },

  mounted() {
    if (this.$route.query) {
      this.detailId = this.$route.query.billId
      this.getDetail(this.detailId)
    }
  },
  methods: {
    handleTab(index) {
      this.tabIndex = index
      this.showTablistVisible = false
    },
    getDetail(billId) {
      repairApi
        .queryRepairWorkOrderById({
          billId,
          userId: this.userId
        })
        .then(res => {
          console.log(res)
          if (res.code == 1) {
            this.dataSource = res.data
          }
        })
    },
    handleApply() {
      Dialog.confirm({
        title: '提示',
        message: '是否结算？'
      }).then(() => {
        repairApi
          .repairWorkOrderSetOver({
            billId: 'ak5uxhDT+eFZ7nZVEUWM6LG53',
            userId: this.userId
          })
          .then(res => {
            console.log(res)
            if (res.success) {
              Notify({ type: 'success', message: '申请成功' })
              this.$router.go(-1)
            }
          })
          .catch(() => {
            // on cancel
          })
      })
    },
    onClickLeft() {
      this.$router.back()
    }
  }
}
</script>

<style lang="less" scoped>
body {
  // background: #f3f3f3;
}

.flex {
  display: flex;
  align-items: center;
}

.registerDetail {
  background: #f3f3f3;
  overflow: auto;

  .detail_header {
    justify-content: space-between;
    margin: 0.2rem 0.2rem;
    border-radius: 5px;
    background: #fff;
    padding: 0.3rem;

    .detail_header_lt {
      .carNo {
        font-size: 0.32rem;
        font-weight: bold;
        margin-bottom: 0.2rem;

        .icon-right {
          margin-left: 0.2rem;
          color: #409eff;
        }
      }

      .hank {
        font-size: 0.28rem;
        color: #666;
      }
    }

    .detail_header_rt {
      justify-content: flex-start;

      .txt {
        font-size: 0.28rem;
        color: #161616;
      }

      .icon-tel {
        color: #fff;
        background: #35bc04;
        font-size: 0.32rem;
        padding: 0.1rem;
        border-radius: 50%;
        margin-right: 0.1rem;
      }
    }
  }

  .formData {
    background: #fff;
  }
}

.label_item {
  color: #35bc04;
  border: 1px solid #35bc04;
  border-radius: 4px;
  margin-right: 0.1rem;
  padding: 0.01rem 0.2rem;
  font-size: 0.2rem;

  &:last-child {
    margin-right: 0;
  }
}

.tabBarBox {
  margin-top: 0.2rem;
}

.tabCar {
  margin-top: 0.1rem;
}

// 卡券
.cardList {
  margin: 0.1rem 0.2rem 0.3rem 0.2rem;
  box-sizing: border-box;
  overflow: hidden;

  .cardItem {
    background: #fff;
    border-radius: 10px;
    box-sizing: border-box;
    overflow: hidden;
    margin-bottom: 0.2rem;

    .box {
      overflow: hidden;

      .cardItem_lt {
        padding: 0.3rem 0.2rem;
        text-align: center;
        box-sizing: content-box;
        background: #ff91d7;
        color: #fff;
        overflow: hidden;
        height: 1.4rem;
        width: 30%;

        .price_icon {
          font-size: 0.3rem;
          color: #fff;
        }

        .price {
          color: #fff;

          .txt {
            font-size: 0.8rem;
            font-weight: bold;
          }

          .name {
            font-size: 0.28rem;
          }
        }
      }

      .cardItem_rt {
        padding: 0.3rem;
        border-bottom: 1px dashed #ccc;
        overflow: hidden;
        height: 1.4rem;
        width: 70%;

        .label_name {
          .label_txt {
            background: #ff3415;
            color: #fff;
            border-radius: 3px;
            text-align: center;
            padding: 0.07rem 0.2rem;
            font-size: 0.24rem;
            margin-right: 0.1rem;
          }

          .label_txt1 {
            margin-top: 0.4rem;
            color: #333;
            font-size: 0.28rem;
            font-weight: bold;
          }
        }

        .label_time {
          margin-top: 0.2rem;
          font-size: 0.26rem;
          color: #666;
        }
      }
    }

    .cardNo {
      padding: 0.2rem 0.3rem 0.2rem 0.2rem;
      font-size: 0.28rem;
      color: #333;
    }
  }
}

// 维修
.repairData {
  margin: 0.1rem 0.2rem 0.3rem 0.2rem;
  box-sizing: border-box;
  overflow: hidden;

  .repairItem {
    background: #fff;
    overflow: hidden;
    border-radius: 5px;
    padding: 0.2rem;
    margin-bottom: 0.2rem;

    .item_title {
      justify-content: space-between;
      padding: 0.1rem 0.1rem 0.2rem 0.3rem;
      border-bottom: 1px solid #f1f1f1;
      font-size: 0.28rem;
      margin-bottom: 0.3rem;
      position: relative;

      &::before {
        content: '';
        display: block;
        width: 3px;
        height: 15px;
        background: #409eff;
        position: absolute;
        left: 0;
        top: 5px;
      }
    }

    .item_content {
      padding: 0 0.3rem;

      .item_contentbox {
        justify-content: space-between;
      }

      .item_data {
        font-size: 0.28rem;
        margin-bottom: 0.2rem;
        display: flex;

        .item_data_label {
          color: #333;
        }

        .item_data_value {
          color: #262626;

          &.txt {
            line-height: 0.32rem;
          }
        }
      }

      .item_data_width {
        width: 4.5rem;
      }
    }
  }
}

// 联系人
.contactbox {
  margin: 0.1rem 0.2rem 0.3rem 0.2rem;

  .contactItem {
    justify-content: space-between;
    background: #fff;
    padding: 0.2rem;
    margin-bottom: 0.1rem;
    border-radius: 4px;

    .contact_lt {
      .header {
        margin-bottom: 0.2rem;
        color: #333;

        .txt {
          font-size: 0.2rem;
          margin-right: 0.2rem;
          background: #409eff;
          padding: 0.1rem 0.2rem;
          border-radius: 4px;
          color: #fff;
        }

        .name {
          font-size: 0.28rem;
        }
      }

      .tel {
        font-size: 0.3rem;
        color: #333;
      }
    }

    .contact_rt {
      .icon-wx {
        font-size: 0.7rem;
        color: #409eff;
      }

      .icon-tel {
        font-size: 0.36rem;
        background: #35bc04;
        color: #fff;
        text-align: center;
        padding: 0.1rem;
        border-radius: 50%;
        position: relative;
        top: -6px;
        margin-right: 0.1rem;
      }
    }
  }
}

.addBtn {
  position: fixed;
  bottom: 0.8rem;
  width: 100%;
  z-index: 1;

  .orderItem_filebox {
    width: 2.8rem;
    margin: auto;
    text-align: center;
    font-size: 0.28rem;
    background: #409eff;
    color: #fff;
    padding: 0.25rem 0rem;
    border-radius: 50px;
  }
}

.submitBtn {
  background: #409eff;
  color: #fff;
  width: 75%;
  margin: auto;
  text-align: center;
  padding: 0.25rem;
  border-radius: 5px;
  margin-top: 0.6rem;
  font-size: 0.3rem;
  margin-bottom: 0.4rem;
}

.doList {
  .doList_item {
    background: #fff;
    padding: 15px;
    font-size: 12px;
    color: #333;
    border-radius: 3px;
    margin-bottom: 10px;
    &:last-child {
      margin-bottom: 0;
    }

    .item_time {
      margin-bottom: 10px;
    }

    .item_do {
      margin-bottom: 10px;
      clear: both;

      .item_name {
        color: #646566;
        float: left;
        font-size: 14px;
      }
    }

    .item_box {
      justify-content: space-between;

      .item_txt {
        font-size: 12px;
        color: #646566;
      }
    }
  }
}

.noContent {
  margin-top: 0.2rem;
}
.task_header {
  background: url('~@/assets/images/title_bg.png') no-repeat center;
  font-size: 0.24rem;
  height: 50px;
  background-size: 100% 100%;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9;

  .top_title {
    position: relative;
    width: 100%;
    height: 50px;

    .top_title_back {
      position: absolute;
      left: 10px;
      line-height: 50px;
      color: #fff;
    }

    .top_title_val {
      text-align: center;
      line-height: 50px;
      color: #fff;
      font-weight: bold;
      font-size: 16px;
    }
    .task_transbox {
      position: absolute;
      right: 10px;
      top: 5px;
      color: #fff;
      z-index: 10;
      font-weight: 400;
      font-size: 10px;
      text-align: center;
      .task_trans {
        width: 24px;
        display: block;
        margin: auto;
      }
    }
  }

  .task_header_data {
    .task_header_date {
      margin-bottom: 10px;
      display: flex;
      align-items: center;

      .task_header_date_w {
        width: 12.5%;
      }

      .task_header_date_item {
        width: 12.5%;
        text-align: center;
        color: #fff;
        font-size: 14px;
      }
    }

    .task_header_followData {
      display: flex;
      align-items: center;
      color: #fff;
      margin-bottom: 10px;

      .task_header_followData_tt {
        width: 12.5%;
        text-align: center;
      }

      .task_header_followData_item {
        width: 12.5%;
        text-align: center;
        font-size: 12px;
        font-weight: bold;
      }
    }
  }
}
.task_detail {
  position: fixed;
  top: 50px;
  left: 0;
  width: 100%;
  z-index: 100;
  .task_detail_header {
    padding: 17px 0 10px;
    background: #fff;
    // margin-bottom: 10px;
    border-bottom: 1px solid #f1f1f1;
    position: relative;

    .title {
      margin: auto;
      display: flex;
      justify-content: center;
      align-items: center;
      .icon-edit {
        font-size: 14px;
      }
      .txt {
        text-align: center;
        //font-family: Alibaba;
        font-weight: 700;
        font-size: 16px;
        color: #333333;
        max-width: 60%;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
      }
      .status_txt {
        // background: rgba(255, 48, 33, 0.2);
        border-radius: 3px;
        padding: 3px 5px;
        font-size: 12px;
        margin-left: 5px;
      }
    }
    .name {
      display: flex;
      text-align: center;
      width: 100%;
      justify-content: center;
      margin-top: 10px;

      .txt {
        //font-family: Alibaba;
        font-weight: 400;
        font-size: 12px;
        color: #999999;
        text-align: center;
        margin-right: 10px;
      }
    }
    .status {
      //font-family: Alibaba;
      font-weight: 700;
      font-size: 12px;
      text-align: center;
      position: absolute;
      top: 16px;
      right: 10px;
      border-radius: 2px;
      padding: 5px;
      display: flex;
      align-items: center;
      .status_icon {
        width: 12px;
        margin-right: 4px;
      }
      &.status1 {
        color: #ff1100;
        background: rgba(255, 48, 33, 0.2);
      }
      &.status2 {
        color: #00b42a;
        background: #e8ffea;
      }
    }
  }
  .tabbox {
    // padding: 0 10px;
    padding-top: 15px;
    border-top: 1px solid #f7f5f5;
    margin-top: 15px;
    position: relative;
    width: 7.5rem;
    overflow: hidden;
    .tab_list {
      width: 10rem;
      overflow-x: auto;
      clear: both;
      .tab_item {
        font-weight: 400;
        font-size: 14px;
        color: #4e5969;
        text-align: center;
        background: #f7f7f7;
        border-radius: 32px;
        padding: 8px 16px;
        margin-right: 6px;
        cursor: pointer;
        float: left;
        &:last-child {
          margin-right: 0;
        }
        &.active {
          color: #165dff;
          text-align: center;
          background: #d8e3ff;
        }
      }
    }
  }
}
.pop_tab {
  padding: 25px 32px;
  .title {
    font-weight: 700;
    font-size: 12px;
    color: #333333;
    line-height: 17px;
    text-align: left;
    margin-bottom: 20px;
  }
  .pop_tablist {
    width: 100%;
    .pop_tab_item {
      background: #f9f9f9;
      border-radius: 62px 62px 62px 62px;
      font-weight: 500;
      font-size: 10px;
      color: #4b4b4b;
      text-align: center;
      width: 30%;
      border: 1px solid #f9f9f9;
      margin-right: 5%;
      box-sizing: border-box;
      float: left;
      margin-bottom: 10px;
      padding: 7px 0;
      cursor: pointer;
      &:nth-child(3n) {
        margin-right: 0;
      }
      &.active {
        color: #ff4444;
        background: #ffd8d3;
        border-radius: 62px 62px 62px 62px;
        border: 1px solid #dd5953;
      }
    }
  }
}
.tabBarBox {
  position: relative;
  .icon_menubox {
    position: fixed;
    right: 0px;
    top: 116px;
    background: #fff;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 11;
  }
  .icon_menu {
    width: 27px;
    margin-left: 10px;
    // position: relative;
    // top: 0px;
    display: block;
    margin: auto;
    padding-top: 10px;
  }
}
.detailbox_item {
  margin-top: 10px;
  background: #fff;
  padding: 10px;
  .detailbox_item_title {
    font-size: 16px;
    font-weight: 700;
    color: #1d2129;
    margin-bottom: 14px;
    background: url('~@/assets/images/ttbg.png') no-repeat left bottom;
    background-size: 32px 6px;
  }
  .detail_content {
    background: #f9fafc;
    border-radius: 4px 4px 4px 4px;
    border: 1px solid #fbfcfe;
    padding: 17px 16px;

    .task_item_type {
      margin-bottom: 20px;

      .task_item_tt {
        font-weight: 800;
        font-size: 12px;
        color: #86909c;
        margin-bottom: 10px;
      }
      .task_item_val {
        font-weight: 700;
        font-size: 16px;
        color: #333333;
      }
      .task_item_desc {
        font-weight: 300;
        font-size: 14px;
        color: #000000;
        background: #f2f3f5;
        padding: 5px 6px;
      }
    }
    .task_itembox {
      overflow: hidden;
      .task_itembox_con {
        width: 50%;
        margin-bottom: 15px;
        float: left;
        .task_label {
          font-weight: 400;
          font-size: 12px;
          color: #86909c;
          margin-bottom: 5px;
        }
        .task_value {
          font-weight: 700;
          font-size: 16px;
          color: #2f2f2f;
        }
      }
    }
  }
  .relat_tab {
    display: flex;
    margin-bottom: 10px;
    .relat_tab_item {
      font-weight: 500;
      font-size: 12px;
      color: #333333;
      border-radius: 4px;
      padding: 5px 8px;
      background: #f7f7f7;
      margin-right: 5px;
      &.active {
        color: #165dff;
        background: #d8e3ff;
      }
    }
  }
  .relat_content {
    .relat_item {
      background: #ffffff;
      box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.09);
      border-radius: 4px 4px 4px 4px;
      border: 1px solid #fbfcfe;
      margin-bottom: 20px;
      padding: 10px 9px 12px;

      .relat_content_header {
        margin-bottom: 10px;
        display: flex;
        justify-content: space-between;

        .name {
          font-weight: bold;
          font-size: 14px;
          color: #333333;
        }
        .status {
          font-weight: 700;
          font-size: 12px;
          color: #00b42a;
          background: #e8ffea;
          border-radius: 2px 2px 2px 2px;
          padding: 5px 8px;
          &.status2 {
            background: rgba(255, 48, 33, 0.2);
            color: #ff1100;
          }
        }
      }
      .relat_carInfo {
        font-weight: 300;
        font-size: 14px;
        color: #000000;
        background: #f2f3f5;
        padding: 5px 6px;
        margin-bottom: 12px;
      }
      .relat_user {
        display: flex;
        justify-content: space-between;
        font-weight: bold;
        font-size: 12px;
        color: #165dff;
        background: #e8f5ff;
        border-radius: 2px 2px 2px 2px;
        padding: 5px 6px;
      }
    }
  }
  .followInfo_content {
    .followInfo_item {
      padding: 10px 0px 10px 20px;

      .followInfo_top {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        .followInfo_circle {
          background: #f2f2f2;
          border-radius: 50%;
          width: 9px;
          height: 9px;
          margin-right: 10px;
        }
        .followInfo_name {
          font-weight: 700;
          font-size: 14px;
          color: #86909c;
        }
      }

      .followInfo_box {
        display: flex;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;

        .followInfo_linebox {
          width: 1px;
          position: relative;
          -ms-flex-item-align: stretch;
          align-self: stretch;
          background: #f2f2f2;
          margin: 0 10px 0 4px;
        }
        .followInfo_val {
          width: 100%;
          padding: 12px 16px;
          background: #f9fafc;
          border-radius: 4px 4px 4px 4px;
          border: 1px solid #fbfcfe;
          flex: 1;
          .followInfo_val_item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            .item_label {
              font-weight: 400;
              font-size: 14px;
              color: #86909c;
            }
            .item_val {
              font-weight: 700;
              font-size: 14px;
              color: #2f2f2f;
            }
          }
          .followInfo_val_item2 {
            .item_label {
              font-weight: 400;
              font-size: 14px;
              color: #86909c;
              margin-bottom: 10px;
            }
            .item_val {
              font-weight: 300;
              font-size: 14px;
              color: #86909c;
              background: #f2f3f5;
              padding: 5px 6px;
            }
          }
        }
      }
      &.active {
        .followInfo_top {
          .followInfo_circle {
            background: #165dff;
          }
          .followInfo_name {
            color: #165dff;
          }
        }
        .followInfo_box {
          .followInfo_linebox {
            background: #165dff;
          }
        }
      }
    }
  }
  .carInfo_content {
    background: #f9fafc;
    border-radius: 4px 4px 4px 4px;
    border: 1px solid #fbfcfe;
    padding: 7px 16px;
    .carInfo_item {
      display: flex;
      justify-content: space-between;
      margin-bottom: 8px;
      .item_label {
        font-weight: 400;
        font-size: 12px;
        color: #86909c;
      }
      .item_val {
        font-weight: 700;
        font-size: 12px;
        color: #333333;
      }
      &:last-child {
        margin-bottom: 0;
      }
    }
  }

  .contact_content {
    .contact_item {
      box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.02);
      border-radius: 4px 4px 4px 4px;
      border: 1px solid #f4f4f6;
      margin-bottom: 3px;
      padding: 12px 10px 12px 10px;

      .contact_top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-bottom: 14px;
        .item_label {
          font-weight: 700;
          font-size: 12px;
          color: #165dff;
          background: #e8f5ff;
          border-radius: 2px 2px 2px 2px;
          padding: 4px 5px;
        }
        .item_icon {
          display: flex;
          .item_img {
            width: 29px;
            height: 29px;
            margin-right: 17px;
            &:last-child {
              margin-right: 0;
            }
          }
        }
      }
      .contact_bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-left: 4px;
        .item_name {
          display: flex;

          .txt1 {
            font-weight: 400;
            font-size: 12px;
            color: #86909c;
          }
          .txt2 {
            font-weight: 700;
            font-size: 12px;
            color: #2f2f2f;
          }
        }
      }
    }
  }

  .repair_content {
    .repair_list {
      .repair_item {
        box-shadow: 0px 5px 5px 0px rgba(0, 0, 0, 0.05);
        border-radius: 4px 4px 4px 4px;
        border: 1px solid #f4f4f6;
        padding: 10px;
        margin-bottom: 10px;
        .item_top {
          display: flex;
          justify-content: space-between;
          border-bottom: 1px solid #f7f5f5;
          padding-bottom: 10px;
          .item_num {
            display: flex;
            .item_icon {
              width: 11px;
              margin-right: 5px;
            }
            .item_name {
              font-weight: 800;
              font-size: 14px;
              color: #333333;
            }
          }
          .item_btn {
            font-weight: 400;
            font-size: 12px;
            color: #165dff;
          }
        }
        .item_bottom {
          padding-top: 8px;
          .item_box {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            align-items: center;
            width: 100%;

            .item_lt {
              display: flex;

              .item_lable {
                font-weight: 400;
                font-size: 12px;
                color: #86909c;
              }
              .item_val {
                font-weight: 400;
                font-size: 12px;
                color: #2f2f2f;
              }
            }
            .item_rt {
              background: #e8f5ff;
              border-radius: 2px 2px 2px 2px;
              font-weight: 700;
              font-size: 10px;
              color: #165dff;
              padding: 3px 5px;
              display: flex;

              .item_lable {
              }
              .item_val {
              }
            }
          }
          .item_box2 {
            .item_lt {
              display: flex; /* 使用弹性盒模型 */
              .item_lable {
                font-weight: 400;
                font-size: 12px;
                color: #86909c;
                width: 60px;
              }
              .item_val {
                font-weight: 400;
                font-size: 12px;
                color: #2f2f2f;
                width: calc(100% - 60px);
              }
            }
          }
        }
      }
    }
  }

  .card_content {
    min-height: calc(100vh - 150px);

    .card_item {
      border-radius: 4px;
      position: relative;
      height: 86px;
      display: flex;
      align-items: center;
      margin-bottom: 10px;
      background: #fff;
      .item_lt {
        width: 134px;
        height: 86px;
        font-weight: 700;
        font-size: 36px;
        line-height: 86px;
        color: #ffffff;
        background: url('~@/assets/images/card_bg.png') no-repeat center;
        background-size: 134px 86px;
        text-align: center;
        margin-right: 10px;
        border-radius: 0px 12px 12px 0px;
      }
      .item_rt {
        padding-top: 10px;
        .item_name {
          margin-bottom: 8px;
          font-weight: 700;
          font-size: 14px;
          color: #2f2f2f;
        }
        .item_number {
          font-weight: 700;
          font-size: 12px;
          color: #2f2f2f;
          margin-bottom: 8px;
        }
        .item_time {
          font-weight: 400;
          font-size: 12px;
          color: #86909c;
          display: flex;
          .txt1 {
            margin-right: 10px;
          }
        }
      }
      .item_type {
        font-weight: 700;
        font-size: 12px;
        color: #ffffff;
        text-align: center;
        padding: 5px 10px;
        border-radius: 0px 4px 0px 4px;
        background: #ff2b2b;
        position: absolute;
        top: 0px;
        right: 0;
      }
    }
  }

  .no_icon {
    padding: 25px;
    .no_icon_img {
      width: 70px;
      display: block;
      margin: auto;
    }
    .no_icon_txt {
      font-weight: 400;
      font-size: 14px;
      color: #86909c;
      text-align: center;
      margin-top: 10px;
    }
  }
}
.mb80 {
  margin-bottom: 80px;
}
.mt0 {
  margin-top: 0px;
}
.mt175 {
  margin-top: 175px;
}
.mt160 {
  margin-top: 165px;
}
.mb60 {
  margin-bottom: 60px;
}
.detailbg {
  background: #f3f3f3;
}
.w100 {
  width: 100% !important;
}

/deep/ .van-tabs__line {
  display: none;
}
/deep/ .van-tab {
  font-weight: 400;
  width: 120px;
  font-size: 14px;
  color: #4e5969;
  text-align: center;
  background: #f7f7f7;
  border-radius: 32px;
  padding: 8px 16px;
  margin-right: 6px;
  // cursor: pointer;
  // flex: inherit;
}
/deep/ .van-tab--active {
  color: #165dff;
  text-align: center;
  background: #d8e3ff;
}
/deep/ .van-tabs__nav--line {
  height: 30px;
  padding: 10px;
}
/deep/ .van-tabs--line .van-tabs__wrap {
  height: auto;
  position: fixed;
  top: 116px;
  left: 0;
  width: 100%;
  z-index: 10;
}
/deep/ .van-tabs__wrap--scrollable .van-tabs__nav {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  width: 85%;
}
.mt165 {
  margin-top: 165px;
}
.carStatus {
  background: rgba(14, 200, 89, 0.2);
  color: #187c17;
  border-radius: 4px;
  padding: 5px;
  font-size: 0.2rem;
  text-align: center;
  width: 1rem;
  margin-right: 5px;
}
.noCarStatus {
  background: rgba(255, 48, 33, 0.2);
  color: #ff1100;
  border-radius: 4px;
  padding: 5px;
  font-size: 0.2rem;
  text-align: center;
  width: 1rem;
  margin-right: 5px;
}
</style>
